home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 44 / PC Actual CD 44.iso / Linux / Cygwin / full.exe / Disk1 / data1.cab / Tools / H-i586-cygwin32 / i586-cygwin32 / include / sys / unistd.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-12-04  |  5.1 KB  |  155 lines

  1. #ifndef _SYS_UNISTD_H
  2. #define _SYS_UNISTD_H
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8. #include <_ansi.h>
  9. #include <sys/types.h>
  10. #define __need_size_t
  11. #include <stddef.h>
  12.  
  13. extern char **environ;
  14.  
  15. void    _EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn)));
  16.  
  17. int    _EXFUN(access,(const char *__path, int __amode ));
  18. unsigned  _EXFUN(alarm, (unsigned __secs ));
  19. int     _EXFUN(chdir, (const char *__path ));
  20. int     _EXFUN(chmod, (const char *__path, mode_t __mode ));
  21. int     _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group ));
  22. int     _EXFUN(close, (int __fildes ));
  23. char    _EXFUN(*ctermid, (char *__s ));
  24. char    _EXFUN(*cuserid, (char *__s ));
  25. int     _EXFUN(dup, (int __fildes ));
  26. int     _EXFUN(dup2, (int __fildes, int __fildes2 ));
  27. int     _EXFUN(execl, (const char *__path, const char *, ... ));
  28. int     _EXFUN(execle, (const char *__path, const char *, ... ));
  29. int     _EXFUN(execlp, (const char *__file, const char *, ... ));
  30. int     _EXFUN(execv, (const char *__path, char * const __argv[] ));
  31. int     _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] ));
  32. int     _EXFUN(execvp, (const char *__file, char * const __argv[] ));
  33. pid_t   _EXFUN(fork, (void ));
  34. long    _EXFUN(fpathconf, (int __fd, int __name ));
  35. int     _EXFUN(fsync, (int __fd));
  36. char    _EXFUN(*getcwd, (char *__buf, size_t __size ));
  37. gid_t   _EXFUN(getegid, (void ));
  38. uid_t   _EXFUN(geteuid, (void ));
  39. gid_t   _EXFUN(getgid, (void ));
  40. int     _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] ));
  41. char    _EXFUN(*getlogin, (void ));
  42. size_t  _EXFUN(getpagesize, (void));
  43. pid_t   _EXFUN(getpgrp, (void ));
  44. pid_t   _EXFUN(getpid, (void ));
  45. pid_t   _EXFUN(getppid, (void ));
  46. uid_t   _EXFUN(getuid, (void ));
  47. int     _EXFUN(isatty, (int __fildes ));
  48. int     _EXFUN(link, (const char *__path1, const char *__path2 ));
  49. off_t   _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
  50. long    _EXFUN(pathconf, (char *__path, int __name ));
  51. int     _EXFUN(pause, (void ));
  52. int     _EXFUN(pipe, (int __fildes[2] ));
  53. int     _EXFUN(read, (int __fildes, void *__buf, size_t __nbyte ));
  54. int     _EXFUN(rmdir, (const char *__path ));
  55. void *  _EXFUN(sbrk,  (size_t __incr));
  56. int     _EXFUN(setgid, (gid_t __gid ));
  57. int     _EXFUN(setpgid, (pid_t __pid, pid_t __pgid ));
  58. pid_t   _EXFUN(setsid, (void ));
  59. int     _EXFUN(setuid, (uid_t __uid ));
  60. unsigned _EXFUN(sleep, (unsigned int __seconds ));
  61. void    _EXFUN(swab, (const void *, void *, ssize_t));
  62. long    _EXFUN(sysconf, (int __name ));
  63. pid_t   _EXFUN(tcgetpgrp, (int __fildes ));
  64. int     _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id ));
  65. char    _EXFUN(*ttyname, (int __fildes ));
  66. int     _EXFUN(unlink, (const char *__path ));
  67. int     _EXFUN(write, (int __fildes, const void *__buf, size_t __nbyte ));
  68.  
  69. /* Provide prototypes for most of the _<systemcall> names that are
  70.    provided in newlib for some compilers.  */
  71. int     _EXFUN(_close, (int __fildes ));
  72. pid_t   _EXFUN(_fork, (void ));
  73. pid_t   _EXFUN(_getpid, (void ));
  74. int     _EXFUN(_link, (const char *__path1, const char *__path2 ));
  75. off_t   _EXFUN(_lseek, (int __fildes, off_t __offset, int __whence ));
  76. int     _EXFUN(_read, (int __fildes, void *__buf, size_t __nbyte ));
  77. void *  _EXFUN(_sbrk,  (size_t __incr));
  78. int     _EXFUN(_unlink, (const char *__path ));
  79. int     _EXFUN(_write, (int __fildes, const void *__buf, size_t __nbyte ));
  80.  
  81. #ifdef __CYGWIN32__
  82. unsigned _EXFUN(usleep, (unsigned int __useconds));
  83. int     _EXFUN(ftruncate, (int __fd, off_t __length));
  84. int     _EXFUN(truncate, (const char *, off_t __length));
  85. int    _EXFUN(gethostname, (char *__name, size_t __len));
  86. char *    _EXFUN(mktemp, (char *));
  87. int     _EXFUN(sync, (void));
  88. int     _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
  89. int     _EXFUN(symlink, (const char *__name1, const char *__name2));
  90. #endif
  91.  
  92. # define    F_OK    0
  93. # define    R_OK    4
  94. # define    W_OK    2
  95. # define    X_OK    1
  96.  
  97. # define    SEEK_SET    0
  98. # define    SEEK_CUR    1
  99. # define    SEEK_END    2
  100.  
  101. #ifdef __svr4__
  102. # define _POSIX_JOB_CONTROL    1
  103. # define _POSIX_SAVED_IDS    1
  104. # define _POSIX_VERSION    199009L
  105. #endif
  106.  
  107. #ifdef __CYGWIN32__
  108. # define _POSIX_JOB_CONTROL    1
  109. # define _POSIX_SAVED_IDS    0
  110. # define _POSIX_VERSION        199009L
  111. #endif
  112.  
  113. #define STDIN_FILENO    0       /* standard input file descriptor */
  114. #define STDOUT_FILENO   1       /* standard output file descriptor */
  115. #define STDERR_FILENO   2       /* standard error file descriptor */
  116.  
  117. long _EXFUN(sysconf, (int __name));
  118.  
  119. # define    _SC_ARG_MAX    0
  120. # define    _SC_CHILD_MAX    1
  121. # define    _SC_CLK_TCK    2
  122. # define    _SC_NGROUPS_MAX    3
  123. # define    _SC_OPEN_MAX    4
  124. /* no _SC_STREAM_MAX */
  125. # define    _SC_JOB_CONTROL    5
  126. # define    _SC_SAVED_IDS    6
  127. # define    _SC_VERSION    7
  128. # define        _SC_PAGESIZE    8
  129.  
  130. # define    _PC_LINK_MAX    0
  131. # define    _PC_MAX_CANON    1
  132. # define    _PC_MAX_INPUT    2
  133. # define    _PC_NAME_MAX    3
  134. # define    _PC_PATH_MAX    4
  135. # define    _PC_PIPE_BUF    5
  136. # define    _PC_CHOWN_RESTRICTED    6
  137. # define    _PC_NO_TRUNC    7
  138. # define    _PC_VDISABLE    8
  139.  
  140. # ifndef    _POSIX_SOURCE
  141. #  define    MAXNAMLEN    1024
  142. # endif        /* _POSIX_SOURCE */
  143.  
  144. /* FIXME: This is temporary until winsup gets sorted out.  */
  145. #ifdef __CYGWIN32__
  146. #define MAXPATHLEN (260 - 1 /* NUL */)
  147. #else
  148. # define    MAXPATHLEN    1024
  149. #endif
  150.  
  151. #ifdef __cplusplus
  152. }
  153. #endif
  154. #endif /* _SYS_UNISTD_H */
  155.